﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGRapidForm.Permission.Service.Interface;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Permission.Component;

namespace SGRapidForm.Permission.Service
{
    partial class PermissionService : IPermissionService
    {
        private PageComponent pageComponent;
        public PageComponent PageComponent
        {
            get
            {
                if (pageComponent == null)
                {
                    pageComponent = new PageComponent();
                }
                return this.pageComponent;
            }
            set { pageComponent = value; }
        }

        public List<PageEntity> Page_GetAllList()
        {
            return this.PageComponent.GetAllList();
        }


        public bool BulkDeletePage(string keyids)
        {
            return this.PageComponent.BulkDeletePage(keyids); ;
        }

        public PageEntity Page_GetByKeyid(string keyid)
        {
            return this.PageComponent.Page_GetByKeyid(keyid);
         }

        public bool Page_Update(PageEntity page)
        {
            return this.PageComponent.UpdatePage(page);
        }
        public bool Page_Add(PageEntity page)
        {
            return this.PageComponent.AddPage(page);
        }
        public List<PageEntity> Page_GetByModuleKeyid(string keyid)
        {
            return this.PageComponent.Page_GetByModuleKeyid(keyid);
         }

        public List<PageEntity> Page_PagingGet(Int32 startRecord, Int32 maxRecords, String sortColumns, String filterConditions)
        {
            return this.PageComponent.PagingGetPages(startRecord,maxRecords,sortColumns,filterConditions);
        }

        public int Page_PagingGetCount(String filterConditions)
        {
            return this.PageComponent.PagingGetPageCount(filterConditions);
        }

        public PageEntity Page_GetKeyidBypagename(string pagecode)
        {
            return this.PageComponent.Page_GetKeyidByPageName(pagecode);
        }

        public PageEntity Page_GetKeyidByPageCode(string pageCode)
        {
            return this.PageComponent.Page_GetKeyidByPageName(pageCode);
        }

        public bool Page_ClearBeforeImporting()
        {
            return this.PageComponent.Page_ClearBeforeImporting();
        }


        public bool Page_Delete(string keyid)
        {
            return this.PageComponent.Page_Delete(keyid);
        }
    }
}
